Dynamic HTML (DHTML) Examples
Using Javascript

Image manipulation with event handlers

Use onClick event handler:
Do not click on this picture!

Use onMouseOver/onMouseOut event handlers:
Mouse over to change this picture:

Use onClick event handler:
Click on this picture to change it:


Hide/Show an Element
use document.myTable.style.display='none';

Hide table  Show table  

Object type Object attr Count
*PGM CLP 12
*PGM RPGLE 21
*FILE DSPF 15
*FILE PF-DTA 18
*FILE PF-SRC 6
*QRYDFN   23


Button with onClick event handler:
use onClick="document.bgColor = prompt('What color?','yellow')"

    


This is the text you entered in the prompt: 
Click here to change the text

Using element.innerText: Initial value
Click here to change the inner text


Setting checkboxes

Choose your favorite OS (check all that apply):
 OS/400
 Windows
 Unix
 MVS
 Linux
 Solaris